// @ts-ignore
import drag from 'v-drag'
import { createApp } from 'vue'
import type { PreviewProps } from './types.d'
import Preview from './Preview.vue'

export default function (props: PreviewProps) {
    const container = document.createElement('div')
    const app = createApp(Preview, { ...props })
    // 注册你的指令
    app.use(drag)
    app.mount(container)
    document.body.appendChild(container)
}
